Simulation of patient drain phase in peritoneal dialysis

ABSTRACT

A method of modeling a patient&#39;s peritoneal dialysis drain phase includes (a) modeling a first segment of a drain phase curve as having a constant flowrate, (b) modeling a second segment of the drain phase curve as having a decaying exponential flowrate, and (c) ensuring that a drain flowrate does not fall below a certain level during therapy by incorporating a switching component so that (i) at a first time the first segment is active while the second segment is inactive and (ii) at a second time the first segment is inactive while the second segment is active.

PRIORITY

This application claims priority to and the benefit as a continuation application of U.S. patent application Ser. No. 12/389,886, filed Feb. 20, 2009, entitled, “Simulation of Patient Drain Phase in Peritoneal Dialysis”, the entire contents of which is incorporated herein by reference and relied upon.

BACKGROUND

The present disclosure relates to medical fluid delivery and in particular to peritoneal dialysis fluid delivery.

Due to disease or other causes, a person's renal system can fail. In renal failure of any cause, there are several physiological derangements. The balance of water, minerals and the excretion of daily metabolic load is no longer possible in renal failure. During renal failure, toxic end products of nitrogen metabolism (urea, creatinine, uric acid, and others) can accumulate in blood and tissues.

Kidney failure and reduced kidney function have been treated with dialysis. Dialysis removes waste, toxins and excess water from the body that would otherwise have been removed by normal functioning kidneys. Dialysis treatment for replacement of kidney functions is critical to many people because the treatment is life saving. One who has failed kidneys could not continue to live without replacing at least the filtration functions of the kidneys.

One type of dialysis is peritoneal dialysis. Peritoneal dialysis uses a dialysis solution or “dialysate”, which is infused into a patient's peritoneal cavity through a catheter implanted in the cavity. The dialysate contacts the patient's peritoneal membrane in the peritoneal cavity. Waste, toxins and excess water pass from the patient's bloodstream through the peritoneal membrane and into the dialysate. The transfer of waste, toxins, and water from the bloodstream into the dialysate occurs due to diffusion and osmosis, i.e., an osmotic gradient occurs across the membrane. The spent dialysate drains from the patient's peritoneal cavity and removes the waste, toxins and excess water from the patient. This cycle is repeated.

There are various types of peritoneal dialysis therapies, including continuous ambulatory peritoneal dialysis (“CAPD”) and automated peritoneal dialysis (“APD”). CAPD is a manual dialysis treatment, in which the patient connects an implanted catheter to a drain and allows a spent dialysate fluid to drain from the patient's peritoneal cavity. The patient then connects the catheter to a bag of fresh dialysate and manually infuses fresh dialysate through the catheter and into the patient's peritoneal cavity. The patient disconnects the catheter from the fresh dialysate bag and allows the dialysate to dwell within the cavity to transfer waste, toxins and excess water from the patient's bloodstream to the dialysate solution. After a dwell period, the patient repeats the manual dialysis procedure.

In CAPD the patient performs several drain, fill, and dwell cycles during the day, for example, about four times per day. Each treatment cycle typically takes about four to five hours. APD is similar to CAPD in that the dialysis treatment includes a drain, fill, and dwell cycle. APD machines, however, perform four to five cycles of peritoneal dialysis treatment automatically, typically overnight while the patient sleeps. Like CAPD, APD machines connect fluidly to an implanted catheter, to one or more sources or bags of fresh dialysate and to a fluid drain.

The APD machines pump fresh dialysate from the dialysate source, through the catheter, into the patient's peritoneal cavity and allow the dialysate to dwell within the cavity so that the transfer of waste, toxins and excess water from the patient's bloodstream to the dialysate solution can take place. The APD machines then pump spent dialysate from the peritoneal cavity, though the catheter, to the drain. APD machines are typically computer controlled so that the dialysis treatment occurs automatically when the patient is connected to the dialysis machine, for example, when the patient sleeps. That is, the APD systems automatically and sequentially pump fluid into the peritoneal cavity, allow for a dwell, pump fluid out of the peritoneal cavity and repeat the procedure. As with the manual process, several drain, fill, and dwell cycles will occur during APD. A “last fill” is typically used at the end of APD, which remains in the peritoneal cavity of the patient when the patient disconnects from the dialysis machine for the day.

In both CAPD and APD, the therapy must allow for a certain amount of time for the patient drain phase. It is important that the drain phase be sufficiently long to allow the patient to drain as completely as possible. On the other hand, if too much time is allowed for the drain phase, that is, the patient is basically finished draining too far in advance of the end of the drain phase, then the drain phase is extending needlessly into time that the patient could be filling or is appending the last fill's dwell phase needlessly. A need accordingly exists for a way to predict and optimize drain phase time to allow for the patient to drain completely or as much as is reasonably possible without needlessly extending drain time and wasting time that could be used to increase therapy dwell.

SUMMARY

The present disclosure sets forth a method and apparatus for predicting a patient's optimal drain phase time. The optimal drain phase time is useful for at least two purposes. First, the optimal drain phase time can be implemented into the patient's continuous ambulatory peritoneal dialysis (“CAPD”) or automated peritoneal dialysis (“APD”) treatment. Second, the optimal drain phase time can be used in the further modeling of possible treatments or therapy regimes for the patient, one or more desirable ones of which can then be selected for actual use. The further treatment or prescription modeling can be done using a three-pore model as discussed below.

The drain phase modeling attempts to match the patient's actual drain profile given certain inputs. One important patient specific input is maximum drain flowrate or Q_(max). Q_(max) typically occurs at the start of the drain. Some patients will drain more quickly than others due to patient-specific physical characteristics. Also, the position of the patient affects Q_(max). A patient standing or sitting may drain quicker than if the same patient is lying down in a supine or prone position. Q_(max) is determined in one embodiment by experimentation with the patient in a drain position that the patient expects to be for at least most treatments.

Referring now to the drawings and in particular to FIGS. 1 and 2, typical drain volume and corresponding flowrate profiles, respectively, are shown. The profiles were derived in a study by Brandes J. C., Packard, J. W., Walters S. K., Fritsche C., Optimization of Dialysate Flow and Mass Transfer During Automated Peritoneal Dialysis, American Journal of Kidney Diseases, Vol. 25, No. 4 (April), 1995, pp. 603-610. FIG. 1 shows a constant drop in drain volume from a full volume of about 2000 ml to a transition drain volume of about 350 to 400 ml. This constant drop occurs while flowrate is generally at a maximum, e.g., Q_(max), which is about 350 ml/min as seen in FIG. 2. Below the transition volume, the volume drains according to a decaying exponential curve. Drain flowrate after the transition point also slows to zero according to a similar curve. The transition point in both FIGS. 1 and 2 separates a first segment from a second segment as discussed in detail below.

According to the present method and apparatus, an equation has been formed that models the first and second segments. The equation relies principally on Q_(max) for the first segment. The equation employs a switching component Φ that either (i) switches the first segment portion of the equation on and the second segment portion of the equation off or (ii) switches the first segment portion of the equation off and the second segment portion of the equation on. The transition time (or volume) at which switching component Φ switches from 1 to 0 is determined empirically, e.g., the duration of the constant high flow Qmax can be measured for each individual patient, and for a particular drain position. The second segment portion of the equation also employs an exponential drain rate constant α, which is patient specific and is determined empirically. The equation relies principally on a for the second segment.

The drain modeling equation can be used in a number of ways. First, it can be used to form individual settings for flowrate threshold (“FRT”) and/or minimum drain volume (“MDV”). One or both of FRT and MDV may be set as alarm limits in an automated peritoneal dialysis (“APD”) machine (which can use either gravity draining or pumped draining)

Second, the drain modeling equation can be used to more accurately model a patient's reaction to therapy, e.g., via a three-pore model. For example, the three-pore model uses a drain time (or dwell time, which is a function of drain time) in one or more places to model a particular patient's reaction to a particular therapy prescription.

Third, the drain modeling equation can be used to set drain and dwell times or periods for actual operation of an APD machine, for example, performing a multiple exchange therapy. Again, the machine can be a gravity drain machine or drain via a pump.

Fourth, the drain modeling equation can be used to set drain times or periods for patients performing manual peritoneal dialysis or CAPD.

It is accordingly an advantage of the present disclosure to provide a method and apparatus that attempt to optimize a drain phase in peritoneal dialysis.

It is another advantage of the present disclosure to provide a method and apparatus that attempt to minimize drain time.

It is a further advantage of the present disclosure to provide a method and apparatus that attempt to maximize drain volume.

It is yet another advantage of the present disclosure to provide a method and apparatus that attempt to prevent patient overfill.

It is yet a further advantage of the present disclosure to provide a method and apparatus that attempt to prevent low drain flowrate alarms.

It is still another advantage of the present disclosure to provide a method and apparatus that attempt to improve estimation of therapy outcome parameters such as UF, urea clearance and creatinine clearance.

Additional features and advantages are described herein, and will be apparent from the following Detailed Description and the figures.

BRIEF DESCRIPTION OF THE FIGURES

FIGS. 1 and 2 are drain volume and drain phase flowrate profiles derived from actual patient data via a study.

FIGS. 3 and 4 are drain volume and drain phase flowrate profiles derived via the modeling method and apparatus of the present disclosure.

FIG. 5 is a schematic diagram illustrating how the drain volume modeling method and apparatus of the present disclosure is used with kinetic modeling of patient therapy outcomes, e.g., using a three-pore model.

FIGS. 6A to 6C illustrate a first therapy modeled via kinetic model using information obtained from the drain volume modeling method and apparatus of the present disclosure.

FIG. 7 is a graph illustrating peritoneal volume over time for the therapy illustrated in FIGS. 6A to 6C.

FIGS. 8A to 8C illustrate a second therapy modeled via kinetic model using information obtained from the drain volume modeling method and apparatus of the present disclosure.

FIG. 9 is a graph illustrating peritoneal volume over time for the therapy illustrated in FIGS. 8A to 8C.

DETAILED DESCRIPTION

The drain volume modeling method and apparatus of the present disclosure uses the concepts and terminology described below.

Maximum drain flowrate, Q_(max), is the initial drain flowrate, which should be a maximum flowrate of the drain flowrate profile. The present disclosure applies to different kinds of APD machines. For example, the APD machine can use a gravity fill and drain, in which the supply bag is placed elevationally above the patient and the drain bag is placed elevationally below the patient. For such a machine, Q_(max) is determined empirically as discussed below. Q_(max) is also determined empirically for continuous ambulatory peritoneal dialysis (“CAPD”), which also uses gravity for filling and draining The HomeChoice® machine, made by the assignee of the present disclosure, pumps spent fluid from the patient to drain. Here, Q_(max) is set by the pump speed, does not need to be determined empirically, and is independent of the patient's drain position.

For modeling purposes, Q_(max) is assumed to remain constant until the patient drain transitions to an exponential decay portion or segment of the profile. Q_(max) is patient specific and is also patient drain position specific. Q_(max) is determined empirically by, for example, weighing the patient's drain over time for a number of exchanges and then averaging the resulting rate. Q_(max) may vary for a patient depending upon whether the patient is sitting, laying down or standing during drain. It is contemplated therefore to obtain empirical data for Q_(max) while the patient is positioned for drain in a position that the patient intends to be for most or all drains. It is also contemplated to obtain empirical data for Q_(max) while the patient is in different positions for drain, e.g., one set of data while the patient is standing for drain, one set of data while the patient is sitting for drain, and a third set of data while the patient is laying down for drain. In such case, an automated peritoneal dialysis (“APD”) machine can be programmed to ask the patient which drain position the patient intends to use for the current treatment.

Flow transition percent (“FTP”) is the percentage of the peritoneal volume at which the patient drain transitions from the first segment, having constant drain flowrate Q_(max), to the second segment having the decaying exponential flowrate. FTP sets the volume (or percentage of total time) at which switching component Φ, discussed in detail herein, switches from 1 to 0. FTP is patient specific and is determined empirically regardless of the type of APD machine (gravity drain or pump to drain) used. FTP may also be dependent upon patient drain position for gravity fed systems or treatments.

The second drain profile segment, having the decaying exponential flowrate, is controlled in large part by a decaying exponential constant α, which is also patient specific and is determined empirically regardless of the type of APD machine (gravity drain or pump to drain) used or if CAPD is performed instead. α itself may depend on drain type, pump or gravity, and perhaps pump type, e.g., peristaltic versus membrane. α may also be dependent upon patient drain position for gravity fed systems or treatments. α is determined by obtaining multiple data points (volume for a given time and flowrate for a given time) during the second or decaying exponential drain flow and volume segment. Different “potential” values of α are then plugged into the second segment of the drain model shown below until a value of α that outputs correct volume and correct flowrate values for the corresponding points in time, or which best match the measured data, is obtained. α can for example be in a range of 0.1 to 0.15.

One parameter that may be set in the software of an APD machine for alarm purposes is a minimum drain percentage (“MDP”). MDP sets a drain limit above which the patient's drain volume must reach during the drain phase. If, for example, the patient does not drain at least eighty percent of the total spent volume in the patient's peritoneum, The APD will sound an alarm and therapy may be halted, preventing the machine from advancing to the next fill phase until the low drain is addressed. As discussed below, MDP can be used with the modeled drain profiles to determine an appropriate dwell time for the patient, in particular, it sets a minimum dwell time to reach MDP

Flowrate threshold (“FRT”) may also be set in the software of an APD machine for alarm purposes. FRT sets a minimum drain flowrate level below which the machine may alarm, for example, indicating that the drain flowrate is so low that the treatment in essence is wasting time by continuing drain. FRT can alternatively be set to define a drain flow limit below which the drain is stopped. As discussed below, FTP and MDP can be used, alone or in combination, with the modeled drain profiles to determine an appropriate dwell time for the patient, which ensures that the dwell time is long enough for MDP to be met but does not continue long enough for the drain flowrate to fall below FTP.

Referring now to FIGS. 3 and 4, drain volume and drain flowrate profiles are shown, respectively, which have been modeled to attempt to match the actual drain volume and drain flowrate profiles of FIGS. 1 and 2. The drain volume profile of FIG. 3 is obtained via the following equation or algorithm:

V _(D) =[V _(D0) −Q _(max) *t]*Φ+[V _(D0) *e ^(αt)]*(1Φ), wherein

-   V_(D) is an instantaneous remaining drain volume in the patient at     time t -   V_(D0) is an initial patient drain volume (fill volume plus UF     accumulated over previous dwell); -   Q_(max) discussed above is a starting flowrate and is assumed to be     constant; -   Φ discussed above is a switching component (from 1 to 0 at FTP),     which is based on time or volume; -   α discussed above is a decaying exponential constant; and -   t is time.

The modeled flowrate profile of FIG. 4 is determined by dividing a change in volume by a corresponding change in time, e.g., drop from 2300 ml to 1600 ml over first two minutes leading to flowrate over that period of 350 ml/min. Specific flowrate values can be obtained via a derivative dV/dT, especially in the second, non-linear, segment.

The equation above and resulting profiles of FIGS. 3 and 4 show a first segment that is dependent on V_(D0) and Q_(max). V_(D0) is the previous fill volume plus an amount of ultrafiltrate (“UF”) removed from the patient over the last dwell. The amount of UF can be estimated via a three-pore model given certain parameters, such as patient physiological characteristics (ability to remove UF), dextrose level of dialysate used and dwell time. For example, if the patient fill is 2000 ml of fresh dialysate and it is determined from a patient kinetic model, such as a three-pore model, or perhaps experimentally, that the patient will acquire 300 ml of ultrafiltrate over the course of a known dwell period, V_(D0) will be set to 2300 ml. Q_(max) is determined empirically or set via pump speed.

The equation above and resulting profiles of FIGS. 3 and 4 show a second segment that is dependent on V_(D0) and α. α is determined empirically as discussed above. The transition point in the above equation occurs when Φ switches from 1 to 0, which is determined empirically. The corresponding transition point in the profiles of FIGS. 3 and 4 occurs when the straight line transitions to the curved or exponentially decaying line.

Referring now to FIG. 5, a schematic showing fill, dwell and drain phases of a peritoneal dialysis treatment illustrates how the drain volume modeling method and apparatus of the present disclosure interfaces with the kinetic modeling of patient therapy outcomes, e.g., using a three-pore model. The duration of the fill phase in APD is set via a pump speed. The duration of the fill phase in CAPD is determined principally by head height of the fill bag above the patient.

Dwell phase duration and drain phase duration are related. A treatment typically requires multiple, e.g., four, fills that are made over an entire treatment, e.g., eight hours. The set fill times leave only so much time for the dwell and drain phases. The less time needed for drain, the more time left for dwell, which is desirable from both clearance and UF standpoints.

Further, accurately modeling an adequate (MDP satisfied) but efficient (FTP satisfied) allows the dwell phase times to be determined accurately given the set fill times. The dwell phase times are important to the kinetic modeling as seen in FIG. 5. Thus, determining accurate dwell times allows the kinetic modeling of patient results to different therapy prescriptions to be done more accurately. One suitable modified three-pore kinetic model is described in Rippe B., Sterlin G., and Haraldsson B., Computer Simulations of Peritoneal Fluid Transport in CAPD, Kidney Int. 1991; 40: 315 to 325. Another suitable modified three-pore kinetic model is described in Vonesh E. F. and Rippe B., Net Fluid Adsorption Under Membrane Transport Models of Peritoneal Dialysis, Blood Purif. 1992; 10: 209 to 226, the entire contents of each of which are incorporated herein by reference and relied upon.

Referring now to FIGS. 6A to 6C, one example therapy modeled using a three-pore kinetic model is illustrated. The three-pore kinetic model used drain times selected from drain volume and drain flowrate profiles, similar to FIGS. 3 and 4, which were determined via the equation above. Here, the patient undergoes four exchanges of two liter fills each, totaling eight liters. PET characteristic is H or high meaning the patient in general has high toxin and glucose clearances.

A modeled drain time and corresponding drain volume is shown for each cycle in FIG. 6B. In each case, the drain volume met the MDP requirement of 85%, and the minimum drain flowrate met the FRT requirement of 75 ml/min, both of which are shown in FIG. 6A. FIG. 6A also shows patient specific parameters, namely, an FTP of 75% (percentage of drain after which switching component Φ changes from 1 to 0) and a Q_(max) of 80 ml/min.

As seen in FIG. 6B, the drain time and drain volume selected vary from cycle to cycle because initial drain volume V_(D0) varies from cycle to cycle. Initial drain volume V_(D0) varies from cycle to cycle because residual volume (volume remaining in the patient's peritoneum after drain is completed) varies from cycle to cycle. As seen in FIG. 6B, residual volume jumps from 150 ml after cycle 1 to 537 ml for cycle 2 and then increases more slowly to 631 ml and 654 ml for cycles three and four.

FIG. 6C shows the three-pore kinetic model's predicted UF removed for the therapy of FIG. 6B. FIG. 6B and FIG. 7 (graphing peak volume over the cycles) highlight one concern about the “four exchange each of a two liter fill” therapy of FIG. 6B, namely, that the predicted peak volume of the patient indicates the patient may become overfilled. A peak volume of roughly 2700 ml may be too high for many patients.

Referring now to FIGS. 8A to 8C, a second example therapy modeled using a three-pore kinetic model is illustrated. The three-pore kinetic model again used drain times selected from drain volume and drain flowrate profiles, similar to FIGS. 3 and 4, calculated via the equation above. Here, instead of four exchanges of two liter fills each, the patient undergoes a first exchange using a two liter fill, and then four exchanges each of a 1.5 liter fill, totaling eight liters like above. PET characteristic is again high.

A modeled drain time and corresponding drain volume is shown for each cycle in FIG. 8B. In each case, the drain volume met the MDP requirement of 85% and the minimum drain flowrate met the FRT requirement of 75 ml/min shown in FIG. 8A. FIG. 8A also shows patient specific parameters of an FTP of 65% and a Q_(max) of 80 ml/min. As seen in FIG. 8B, the drain time and drain volume vary from cycle to cycle because initial drain volume V_(D0) varies from cycle to cycle. Here, the first drain volume is the biggest and the first drain time is the longest because the first fill is the biggest, namely, two liters versus 1.5 liters for the remaining four fills. The drain volumes and drain times increase from cycle two to cycle five because residual volume increases in each instance from cycle two to cycle five.

FIGS. 8B and 9 highlight that five exchange or cycle therapy of FIG. 8B predicts a reduction of the maximum peak volume to roughly 2350 ml, which may be better suited for the particular patient. FIG. 8C shows the three-pore kinetic model's predicted UF removed for the therapy of FIG. 8B. The UF removed and overall clearances are comparable to those of FIG. 6C, and the patient absorbs less glucose, which is beneficial because the patient does not gain as much weight. Thus, assuming that the additional exchange can be done in a prescribed or desired total therapy duration, the therapy of FIG. 8B may be more desirable than the therapy of FIG. 6B. In any case, the more accurately predicted drain times and volumes discussed herein allow the therapies of FIGS. 6B and 8B to be predicted more accurately, so that a better and more informed decision can be made for the patient.

It should be understood that various changes and modifications to the presently preferred embodiments described herein will be apparent to those skilled in the art. Such changes and modifications can be made without departing from the spirit and scope of the present subject matter and without diminishing its intended advantages. It is therefore intended that such changes and modifications be covered by the appended claims. 

The invention is claimed as follows:
 1. A method of modeling a patient's peritoneal dialysis drain phase comprising: modeling a first segment of a drain phase curve as having a constant flowrate; modeling a second segment of the drain phase curve as having a decaying exponential flowrate; and ensuring that a drain flowrate does not fall below a certain level during therapy by incorporating a switching component so that (i) at a first time the first segment is active while the second segment is inactive and (ii) at a second time the first segment is inactive while the second segment is active.
 2. The method of claim 1, which includes setting a flow transition percentage at which the switching component transitions from the first segment to the second segment.
 3. The method of claim 2, wherein setting the flow transition percentage includes setting a volume at which the switching component transitions from the first segment to the second segment.
 4. The method of claim 2, wherein setting the flow transition percentage includes setting a percentage of time at which the first segment is active relative to the second segment.
 5. The method of claim 1, which includes setting a minimum drain volume or drain volume percentage that must be met during the drain phase.
 6. The method of claim 1, which further includes determining (i) a minimum drain percentage or minimum drain volume, (ii) a low flowrate level, and (iii) a drain phase time that is long enough for the minimum drain percentage or minimum drain volume to be met but not long enough for an actual drain flowrate to fall below the low flowrate level.
 7. The method of claim 1, which further includes modeling for the patient a dwell time for a peritoneal dialysis dwell phase.
 8. The method of claim 1, which further includes determining a low drain flowrate threshold below which therapy is stopped during the drain phase.
 9. The method of claim 1, which includes modeling the constant flowrate for a particular patient body position taken during the drain phase.
 10. A peritoneal dialysis method comprising: modeling a first segment of a drain phase curve for a peritoneal dialysis drain phase as having a constant flowrate; modeling a second segment of the drain phase curve for the peritoneal dialysis drain phase as having a decaying exponential flowrate; incorporating a switching component so that (i) at a first time during the drain phase the first segment is active while the second segment is inactive and (ii) at a second time during the drain phase the first segment is inactive while the second segment is active; using the modeled first and second drain phase segments and the switching component to determine at least one of: (i) a drain time for the drain phase, (ii) a low flowrate setting, or (iii) a minimum drain volume percentage; and entering at least one of the drain time, the low flowrate setting, or the minimum drain volume percentage into an automated peritoneal dialysis (“APD”) machine.
 11. The method of claim 10, wherein modeling the second drain phase segment includes empirically calculating a patient specific decaying exponential constant.
 12. The method of claim 11, wherein empirically calculating the patient specific decaying exponential constant is performed based upon a drain type, the drain type including (i) a pumped drain or (ii) a gravity fed drain.
 13. The method of claim 11, wherein empirically calculating the patient specific decaying exponential constant is performed based upon a pump type, the pump type including (i) a peristaltic pump or (ii) a membrane pump.
 14. A peritoneal dialysis method comprising: modeling a first segment of a drain phase curve as having a constant flowrate; modeling a second segment of the drain phase curve as having a decaying exponential flowrate; incorporating a switching component so that (i) at a first time the first segment is active while the second segment is inactive and (ii) at a second time the first segment is inactive while the second segment is active; and using the modeled first and second drain phase segments and the switching component to set in an automated peritoneal dialysis (“APD”) machine at least one of: (i) a low flowrate level; or (ii) a minimum drain volume percentage.
 15. The method of claim 14, which further includes modeling an appropriate dwell time for the patient and setting the dwell time into the APD machine.
 16. The method of claim 15, which includes using the minimum drain volume percentage to determine the appropriate dwell time.
 17. A peritoneal dialysis method comprising: modeling a first drain phase curve including (i) a first segment having a constant flowrate, (ii) a second segment having a decaying exponential flowrate, and (iii) a switching component that causes the first segment to be active at a first time while the second segment is inactive, and the first segment to be inactive at a second time while the second segment is active; modeling a second drain phase curve including (i) a first segment having a constant flowrate, (ii) a second segment having a decaying exponential flowrate, and (iii) a switching component that causes the first segment to be active at a first time while the second segment is inactive, and the first segment to be inactive at a second time while the second segment is active; selecting one of the first or second drain phase curves for a peritoneal dialysis treatment; and setting at least one parameter of the peritoneal dialysis treatment based upon the selected drain phase curve.
 18. The method of claim 17, wherein the at least one parameter includes at least one of a drain time, a drain volume or a drain flowrate.
 19. The method of claim 17, wherein modeling the first drain phase curve includes modeling the first drain curve for a first patient body position, and wherein modeling the second drain phase curve includes modeling the second drain curve for a second patient body position.
 20. The method of claim 17, wherein the body positions include standing, sitting or lying down. 